package tool.analysis.series;

import java.util.Set;

    /**
     * @author jwb09119
     * @date 2013/12/17
     * 
     * This interface is implemented by any object that can be analysed as part of a series by the
     * SeriesAnalyser class.  ItIt is intended to restrict access to information requesting
     * operations and queries.  The interface doe not permit any state change in the implementing 
     * class via the interface.
     */

public interface ISeriesMember {

    
        /**
         * Gets the unique name of the subject of the experiment.  The name is unique within the
         * series of experiments
         * @return String - usually representing the subject matter of the experiment or a path to
         *                  the relevant files
         */
        String getSubjectName ();

        
        /**
         * Gets a count of the number of types found in this experiment that are concrete classes
         * @return int - the number of concrete types
         */
        int getConcreteClassCount ();

        
        /**
         * Gets a count of the number of types found in this experiment that are abstract classes
         * @return int - the number of abstract classes
         */
        int getAbstractClassCount ();

        
        /**
         * Gets a count of the number of types found in this experiment that are interfaces
         * @return int - the number of interfaces
         */
        int getInterfaceCount ();


        /**
         * Gets a count of the number of instances where a type implements an interface.
         * @return int - the number of implementing classes or abstract classes
         */
        int getCountofEntitiesImplementingInterfaces ();

        
        /**
         * Gets a count of the number of times that one interface extends another.
         * @return int - the number of extending interfaces
         * 
         * NB - one interface extending multiple other interfaces will be counted once for each
         *      extension.
         */
        int getCountOfEntitiesExtendingInterfaces ();


        /**
         * Gets a count of the total number of CC, AC and I in the source code represented by this object.
         * @return int - a count of distinct type entities.
         */
        int getCountOfEntities ();


        /**
         * Gets a list of names representing all interfaces presentin the code base represented
         * by this object.
         * @return {@link Set}<String> - a list of unique names
         */
        Set<String> getInterfaceNames ();


        /**
         * Gets the number of implementers of a specified interface that exists in the code base
         * represented by this object
         * @param interfaceName - the unique identifier of the interface being queried
         * @return int - the number of implementors for the requested interface
         * 
         * NB - it is the responsibility of the client to ensure that the interface exists before
         *      using this method.  A non-existent interface may return a negative number response,
         *      but not guaranteed.
         */
        int getImplementersCountFor (String interfaceName);

        
        /**
         * Gets the number of extenders of a specified interface that exists in the code base
         * represented by this object
         * @param interfaceName - the unique identifier of the interface being queried
         * @return int - the number of extenders for the requested interface
         * 
         * NB - it is the responsibility of the client to ensure that the interface exists before
         *      using this method.  A non-existent interface may return a negative number response,
         *      but not guaranteed.
         */
        int getExtendersCountFor (String interfaceName);


        /**
         * Gets a count of all instances of a specific interface being used as the type of a class
         * variable in the code base represented by this object
         * @param interfaceName - a unique identifier for a specific interface
         * @return int - the count of uses of the interface 'interfaceName' as the type of a class
         *               variable
         */
        int getUseAsClassVariableCount (String interfaceName);


        /**
         * Gets a count of all instances of a specific interface being used as the type of a method
         * parameter in the code base represented by this object
         * @param interfaceName - a unique identifier for a specific interface
         * @return int - the count of uses of the interface 'interfaceName' as the type of a method
         *               parameter
         */
        int getUseAsMethodParameterCount (String interfaceName);


        /**
         * Gets a count of all instances of a specific interface being used as the type of a local
         * (method) variable in the code base represented by this object
         * @param interfaceName - a unique identifier for a specific interface
         * @return int - the count of uses of the interface 'interfaceName' as the type of a local
         *               (method) variable
         */
        int getUseAsLocalVariableCount (String interfaceName);

}
